package org.com.behavioralPattern.chainofResponsibilityPattern;

/**
 * @author Jonny
 * @version 1.0
 * @Description:
 * @date 2021/4/27 11:51
 */
public class PlayerA extends Player {

     public PlayerA(Player successer){
         this.setSuccessor(successer);
     }

    public void handle(int i) {
        if (i==1){
            System.out.println("PlayerA 喝酒");
        }else {
            System.out.println("PlayA把花传递下去");
            next(i);
        }
    }
}
